home *** CD-ROM | disk | FTP | other *** search
- Subject: Re: Forcing a draw
- Sent: 5/21/96 7:08 AM
- Received: 5/22/96 8:32 AM
- From: Henri Lamiraux, lamiraux@apple.com
- Reply-To: ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
-
- >>This easiest way would be to call Invalidate on the view and immediately
- >>call Draw. We need to add a ForceRedraw method.
- >
- >Henri:
- >
- >I have forced redraw in one my view with the following code, picked from
- >somewhere in either ODF or ODF Example code:
- >
- >void CMyView::UpdateHighlight(Environment* ev, ODShape* selectionShape,
- >FW_Boolean redraw)
- >{
- > this->Invalidate(ev, selectionShape);
- > if (redraw)
- > {
- > FW_CFrameFacetIterator iter(ev, this->GetFrame(ev));
- > for (ODFacet* facet = iter.First(ev);
- >iter.IsNotComplete(ev); facet = iter.Next(ev))
- > facet->GetWindow(ev)->Update(ev);
- > }
- >}
- >
- >Should I be better replacing the facet->GetWindow(ev)->Update(ev) with a
- >call to this->Draw(ev, facet, selectionShape)?
- >
- >I was not calling Draw directly because I thought doing so will keep a
- >pending update event for that window. Is that true?
- >
- >Serge
-
- Serge,
-
- For embedding part your are right, this is the right way to force an
- update. Calling FW_CView::Draw is not going to redraw embedded parts
- unless you wrote your part like ODFDraw which doesn't let OpenDoc redraw
- embedded parts but draw them directly along with its intrisinc content.
-